package test.pcs;

import com.xiaomi.jr.lc.front.service.api.PlatformService;
import com.xiaomi.jr.lc.front.service.enums.PlatformOS;
import com.xiaomi.jr.lc.front.service.request.GetBannerListReq;
import com.xiaomi.jr.lc.front.service.response.GetBannerListResp;
import net.rubyeye.xmemcached.MemcachedClient;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import test.BaseTest;

/**
 * Created on 2016/8/8.
 */
public class Demo3FrontTest1 extends BaseTest {

    @Autowired
    PlatformService platFormServiceClient;

    @Autowired
    MemcachedClient pcsProductionMemeryClient;
    @Autowired
    MemcachedClient pcsCommonMemeryClient;

//    @Test
    public void test() {
        test10();
    }

    void test10() {
        GetBannerListReq req = new GetBannerListReq();
        req.setPlatformOS(PlatformOS.IOS);

        GetBannerListResp bannerList = platFormServiceClient.getBannerList(req);
        display(bannerList);
    }
    void test1(){
        String key = "LC_FRONT_getBannerList_IOS_null";
        Object o = null;
        Object o1 = null;
        try {
            o = pcsProductionMemeryClient.get(key);
            o1 = pcsCommonMemeryClient.get(key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        display(o);
        display(o1);
    }
}